package generics.cl.processor;

import generics.cl.container.AbstractContainer;

import java.util.LinkedList;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: Admin
 * Date: 10.05.11
 * Time: 16:32
 * To change this template use File | Settings | File Templates.
 */
public abstract class AbstractProcessorGeneric<C extends AbstractContainer> {

	public abstract C createContainer();

	public List<C> container_list = new LinkedList<C>();

	public C paintWall() {
		C container = createContainer();
		container.paint();
		return container;
	}

	public void add(C container) {
		container_list.add(container);
	}

	public List<C> getContainerList() {
		return container_list;
	}
}
